package com.ruoyi.yf.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yf.mapper.YfMedicalWasteTreatmentManagerMapper;
import com.ruoyi.yf.domain.YfMedicalWasteTreatmentManager;
import com.ruoyi.yf.service.IYfMedicalWasteTreatmentManagerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 第三方医废处置公司详细信息管理Service业务层处理
 *
 * @author XiaoYi...
 * @date 2020-08-14
 */
@Service
public class YfMedicalWasteTreatmentManagerServiceImpl implements IYfMedicalWasteTreatmentManagerService {
    @Autowired
    private YfMedicalWasteTreatmentManagerMapper yfMedicalWasteTreatmentManagerMapper;

    /**
     * 查询第三方医废处置公司详细信息管理
     *
     * @param id 第三方医废处置公司详细信息管理ID
     * @return 第三方医废处置公司详细信息管理
     */
    @Override
    public YfMedicalWasteTreatmentManager selectYfMedicalWasteTreatmentManagerById(Long id) {
        return yfMedicalWasteTreatmentManagerMapper.selectYfMedicalWasteTreatmentManagerById(id);
    }

    /**
     * 查询第三方医废处置公司详细信息管理列表
     *
     * @param yfMedicalWasteTreatmentManager 第三方医废处置公司详细信息管理
     * @return 第三方医废处置公司详细信息管理
     */
    @Override
    public List<YfMedicalWasteTreatmentManager> selectYfMedicalWasteTreatmentManagerList(YfMedicalWasteTreatmentManager yfMedicalWasteTreatmentManager) {
        return yfMedicalWasteTreatmentManagerMapper.selectYfMedicalWasteTreatmentManagerList(yfMedicalWasteTreatmentManager);
    }

    /**
     * 新增第三方医废处置公司详细信息管理
     *
     * @param yfMedicalWasteTreatmentManager 第三方医废处置公司详细信息管理
     * @return 结果
     */
    @Override
    public int insertYfMedicalWasteTreatmentManager(YfMedicalWasteTreatmentManager yfMedicalWasteTreatmentManager) {
        yfMedicalWasteTreatmentManager.setCreateTime(DateUtils.getNowDate());
        return yfMedicalWasteTreatmentManagerMapper.insertYfMedicalWasteTreatmentManager(yfMedicalWasteTreatmentManager);
    }

    /**
     * 修改第三方医废处置公司详细信息管理
     *
     * @param yfMedicalWasteTreatmentManager 第三方医废处置公司详细信息管理
     * @return 结果
     */
    @Override
    public int updateYfMedicalWasteTreatmentManager(YfMedicalWasteTreatmentManager yfMedicalWasteTreatmentManager) {
        yfMedicalWasteTreatmentManager.setUpdateTime(DateUtils.getNowDate());
        return yfMedicalWasteTreatmentManagerMapper.updateYfMedicalWasteTreatmentManager(yfMedicalWasteTreatmentManager);
    }

    /**
     * 删除第三方医废处置公司详细信息管理对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteYfMedicalWasteTreatmentManagerByIds(String ids) {
        Long[] array = Convert.toLongArray(ids);

        return yfMedicalWasteTreatmentManagerMapper.deleteYfMedicalWasteTreatmentManagerByIds(Convert.toStrArray(ids));
    }


    /**
     * 删除第三方医废处置公司详细信息管理信息
     *
     * @param id 第三方医废处置公司详细信息管理ID
     * @return 结果
     */
    @Override
    public int deleteYfMedicalWasteTreatmentManagerById(Long id) {
        return yfMedicalWasteTreatmentManagerMapper.deleteYfMedicalWasteTreatmentManagerById(id);
    }
}
